﻿<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>创建单元</title>
	<link rel="stylesheet" href="./css/css.css">
	<link rel="stylesheet" href="./css/leftBar.css">
	<script type="text/javascript" src="./js/jquery-1.8.3.js"></script>
	<link type="text/css" rel="Stylesheet" href="./css/nmc.css" />
	<script type="text/javascript" src="./js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="./js/messagecenter.js"></script>
	<script type="text/javascript" src="./js/common.js"></script>
	<script type="text/javascript" src="./js/data4.js"></script>
	<script type="text/javascript" src="./js/canvas2.js"></script>
	<style type="text/css">
		.app_text{
			color:#04A0E9;
		}
		.page-split input{
			display:inline;
			margin:0px 4px;
		}
		.myCanvas{
			overflow-y: auto !important;
			overflow-x:hidden !important;
		}
	</style>
	<script>
		var curCpu;
        window.onload = function() {
            
        };
        function lineEvent1(){}
        function lineEvent2(){}
        function lineEvent3(){}
        function  iconEvent4(obj){
			if(obj.param){
			    if(obj.param.cpuSerial){
                    $("#cpuSerial").val(obj.param.cpuSerial);
				}
                if(obj.param.cpuId){
                    $("#cpuId").val(obj.param.cpuId);
                }
                if(obj.param.cpuType){
                    $("#cpuType").val(obj.param.cpuType);
                }
                if(obj.param.cpuRemark){
                    $("#cpuRemark").val(obj.param.cpuRemark);
                }
			}
            curCpu = obj;
        }
        
        function deleteLevel999(){
        	if(rightClickObj&&!isNaN(rightClickObj.pIndex)){
        		if(rightClickObj.cpu.id){
        			var delIndex = rightClickObj.index;
        			if(!isNaN(delIndex)){
        				var delUrl = "[[@{/cpu/delete}]]";
        				$.ajax({url:delUrl,
        		        	data:{id:rightClickObj.cpu.id},
        		        	dataType:"JSON",
        		        	ContentType: "application/x-www-form-urlencoded",
        		        	type:"POST"
        		        }).done(function(data){
        		        	if(data.success){
        		        		alert("删除成功 ");
                				var newcanvasAllLevel2 = canvasAllLevel2;
                				canvasAllLevel2 = [];
                				for(var i=0;i<newcanvasAllLevel2.length;i++){
                					var obj = newcanvasAllLevel2[i];
	                				if(obj.cpu.id!=rightClickObj.cpu.id){
	                					canvasAllLevel2.push(obj);
	                				}
                				}
                	        	drawCircles();
        		        	}
        		        }).fail(function(res){
        		        	alert("删除失败");
        		        });
        			}
        		}else{
        			var delIndex = rightClickObj.index;
        			if(!isNaN(delIndex)){
        				var newcanvasAllLevel2 = canvasAllLevel2;
        				canvasAllLevel2 = [];
        				var newcanvasAllLevel1 = canvasAllLevel1;
        				canvasAllLevel1 = [];
        				for(var i=0;i<newcanvasAllLevel1.length;i++){
	        				addCanvasLevel1(i,0,newcanvasAllLevel1[i]);
        				}
        				for(var i=0;i<newcanvasAllLevel2.length;i++){
        					var obj = newcanvasAllLevel2[i];
        					if(obj.index!=delIndex||rightClickObj.pIndex!=obj.pIndex){
        						addCanvasLevel2( obj.pIndex,null,obj.cpu);
        					}
        				}
        			}
        		}
        	}else{
        		if(rightClickObj.id){
        			var delIndex = rightClickObj.index;;
        			if(!isNaN(delIndex)){
        				var delUrl = "[[@{/board/delete}]]";
        				$.ajax({url:delUrl,
        		        	data:{id:rightClickObj.id},
        		        	dataType:"JSON",
        		        	ContentType: "application/x-www-form-urlencoded",
        		        	type:"POST"
        		        }).done(function(data){
        		        	if(data.success){
                				alert('删除成功 ');
                				var newcanvasAllLevel1 = canvasAllLevel1;
                				canvasAllLevel1 = [];
                				canvasAllLevel2 = [];
                				for(var n=0;n<boardsData.length;n++){
                					var len=canvasAllLevel1.length;
                					if(boardsData[n].id!=rightClickObj.board.id){
        			                    addCanvasLevel1(len,boardsData[n].cpus.length,boardsData[n]);
        			                    var cpus = boardsData[n].cpus;
        			                    if(cpus&&cpus.length>0){
        			                    	for(var n2=0;n2<cpus.length;n2++){
        			                    		cpus[n2].boardId=boardsData[n].id;
    			                        		addCanvasLevel2(len ,null,cpus[n2]);

        			                    	}
        			        	            //drawCircles();
        			                    }
                					}
                				}
                				drawCircles();
        		        	}
        		        }).fail(function(){
        		        	alert("删除失败");
        		        });
        			}
        		}else{
        			var delIndex = rightClickObj.index;
        			if(!isNaN(delIndex)){
        				var newcanvasAllLevel2 = canvasAllLevel2;
        				canvasAllLevel2 = [];
        				var newcanvasAllLevel1 = canvasAllLevel1;
        				canvasAllLevel1 = [];
        				for(var i=0;i<newcanvasAllLevel1.length;i++){
        					if(newcanvasAllLevel1[i].index!=delIndex){
        						addCanvasLevel1(i,0,newcanvasAllLevel1[i]);
        					}
        				}
        				for(var i=0;i<newcanvasAllLevel2.length;i++){
        					var obj = newcanvasAllLevel2[i];
        					if(obj.index!=delIndex||rightClickObj.pIndex!=obj.pIndex){
        						addCanvasLevel2( obj.pIndex,null,obj.cpu);
        					}
        				}
        			}
        		}
        	}
        	moveAllObjs = {};
        	drawCircles();
        }
        
	</script>
</head>
<body>
<div class="left_content">
	<div class="left_block1">
		<div class="left_logo"></div>
		<div class="left_title">品牌数据库编辑器，高效工作，人性化交互</div>
		<div class="left_icons">
			<div class="left_icon1"></div>
			<div class="left_icon2"></div>
			<div class="left_icon3"></div>
		</div>
	</div>
	<div class="left_block2">
		<div class="left_menu" onclick="window.location.href='physical_topology_library';" style="background-color:#04A0E9;color:#FFFFFF;border-top:1px solid #FFFFFF;">拓扑文件库</div>
		<div class="left_menu" onclick="window.location.href='logical_application_library';">逻辑预案库</div>
		<div class="left_menu" onclick="window.location.href='deploy_topology_library';">部署库</div>
		<div class="left_menu monitor">监控</div>
		<div class="left_menu level2" >
			<div class="level2Border" onclick="window.location.href='physical_monitors';">
				物理监控
			</div>
		</div>
		<div class="left_menu level2" >
			<div class="level2Border" onclick="window.location.href='logical_monitors';">
				逻辑监控
			</div>
		</div>
		<div class="left_menu other">其他</div>
		<div class="left_menu  level22" >
			<div class="level22Border" onclick="window.location.href='commonCMD';">
				我的常用命令
			</div>
		</div>
		<div class="left_menu level22" >
			<div class="level22Border" onclick="window.location.href='generalCMD';">
				命令模板
			</div>
		</div>
	</div>
	<form th:action="@{/logout}" method="post" >
		<div class="left_block3">
			<div class="left_title">快捷管理机箱、板卡、芯片，提高工作效率便捷查找功能相关物理和逻辑链接，高效编辑请登陆BDE账号</div>
			<button class="bigmoniter" type="button" onclick="showBig();" style="cursor:pointer;">大屏监控</button>
			<button class="login"  type="submit">注销</button>
		</div>
	</form>
</div>
<div class="right_content" >
	<form id="form1">
		<input type="hidden" id="curId" name="curId">
		<input type="hidden" id="id" name="id">
		<input type="hidden" id="returnUrl" name="returnUrl">
		<input type="hidden" id="name" name="name">
		<!-- 头部 -->
		<div class="top-bar" style="right:120px;">
			<div class="b3">
				<img src="./images/main.png"><div class="hostMachine"></div>
			</div>
			<button class="b4" type="button" onclick="nextStep();" style="width:95px;line-height: 30px;">绑定物理链路</button>
			<button class="b5" type="button" onclick="showView();">预览</button>
			<button  class="b6" type="button" onclick="back();">返回</button>
		</div>


		<!-- 右侧 -->
		<div class="right">
			<div class="r0 app_text">图元</div>
		</div>
		<!-- 左侧 -->
		<div class="table-box">

		</div>
		<!-- 底部 -->
		<div class="bottom" style="display:none;" id="bottom1">
			<div class="btm-bar">
				<div class="bar1">属性</div>
			</div>
			<div class="bt2">
				<div>编号&nbsp;:</div>
				<div><input type="text" id="cpuSerial2" placeholder="输入编号"/></div>
			</div>
			<div class="bt3">
				<div>名称&nbsp;:</div>
				<div><input type="text" id="cpuId2" placeholder="输入名称"></div>
			</div>
			<div class="bt4">
				<div>类型&nbsp;:</div>
				<div style="margin-left:20px;">
					<select style="width:100px;border:none;color:#434C55;" id="cpuType2">
						<option value="0">选择类型</option>
						<option value="1">SW</option>
						<option value="2">FPGA</option>
						<option value="3">MSU</option>
						<option value="4">DSP</option>
						<option value="5">PPC</option>
						<option value="6">ARM</option>
					</select>
				</div>
			</div>
			<!-- <div class="bt5">
				<div>备注&nbsp;:</div>
				<div style="position:absolute;left:40px;right:10px;top:0px;bottom:0px; "><input type="text" id="cpuRemark2" placeholder="输入备注信息" style="width:100%;"></div>
			</div> -->
			<button  class="b6" type="button" onclick="dissave();" style="margin-right:100px;">取消</button>
			<button  class="b6" type="button" onclick="saveCpus();">保存</button>
		</div>
		<!-- 新增cpu -->
		<div class="bottom" style="display:none;" id="bottom2">
			<div class="btm-bar">
				<div class="bar1">属性</div>
			</div>
			<div class="bt2">
				<div>编号&nbsp;:</div>
				<div><input type="text" id="cpuSerial" placeholder="输入编号"/></div>
			</div>
			<div class="bt3">
				<div>名称&nbsp;:</div>
				<div><input type="text" id="cpuId" placeholder="输入名称"></div>
			</div>
			<div class="bt4">
				<div>类型&nbsp;:</div>
				<div style="margin-left:20px;">
					<select style="width:100px;border:none;color:#434C55;" id="cpuType">
						<option value="0">选择类型</option>
						<option value="1">SW</option>
						<option value="2">FPGA</option>
						<option value="3">MSU</option>
						<option value="4">DSP</option>
						<option value="5">PPC</option>
						<option value="6">ARM</option>
					</select>
				</div>
			</div>
			<!-- <div class="bt5">
				<div>备注&nbsp;:</div>
				<div style="position:absolute;left:40px;right:10px;top:0px;bottom:0px; "><input type="text" id="cpuRemark" placeholder="输入备注信息" style="width:100%;"></div>
			</div> -->
			<button  class="b6" type="button" onclick="dissave();" style="margin-right:100px;">取消</button>
			<button  class="b6" type="button"  id="saveNewCpu">保存</button>
		</div>
		<!-- 新增板卡 -->
		<div class="bottom" style="display:none;" id="bottom4">
			<div class="btm-bar">
				<div class="bar1">属性</div>
			</div>
			<div class="bt2">
				<div>编号&nbsp;:</div>
				<div><input type="text" id="boardId" placeholder="输入编号"/></div>
			</div>
			<div class="bt3">
				<div>名称&nbsp;:</div>
				<div><input type="text" id="boardName" placeholder="输入名称"></div>
			</div>
			<div class="bt4">
				<div>类型&nbsp;:</div>
				<div style="margin-left:20px;">
					<select style="width:100px;border:none;color:#434C55;" id="boardType">
						<option value="0">选择类型</option>
						<option value="1">主控制板</option>
						<option value="2">主交换板</option>
						<option value="3">备交换板</option>
						<option value="4">备控制板</option>
						<option value="5">处理板</option>
					</select>
				</div>
			</div>
			
			<button class="b6" type="button" onclick="dissave();" style="margin-right:100px;">取消</button>
			<button  id="saveNewBoard" class="b6" type="button" >保存</button>
		</div>
		<!-- 编辑板卡 -->
		<div class="bottom" style="display:none;" id="bottom3">
			<div class="btm-bar">
				<div class="bar1">属性</div>
			</div>
			<div class="bt2">
				<div>编号&nbsp;:</div>
				<div><input type="text" id="boardId2" placeholder="输入编号"/></div>
			</div>
			<div class="bt3">
				<div>名称&nbsp;:</div>
				<div><input type="text" id="boardName2" placeholder="输入名称"></div>
			</div>
			<div class="bt4">
				<div>类型&nbsp;:</div>
				<div style="margin-left:20px;">
					<select style="width:100px;border:none;color:#434C55;" id="boardType2">
						<option value="0">选择类型</option>
						<option value="1">主控制板</option>
						<option value="2">主交换板</option>
						<option value="3">备交换板</option>
						<option value="4">备控制板</option>
						<option value="5">处理板</option>
					</select>
				</div>
			</div>
			<!-- <div class="bt5">
				<div>备注&nbsp;:</div>
				<div style="position:absolute;left:40px;right:10px;top:0px;bottom:0px; "><input type="text" id="remark2" placeholder="输入备注信息文字描述" style="width:100%;"></div>
			</div> -->
			<button class="b6" type="button" onclick="dissave();" style="margin-right:100px;">取消</button>
			<button  id="saveMachineOrCpus" class="b6" type="button" onclick="saveBoards();">保存</button>
		</div>
	</form>
</div>
<div class="rightKey shadow">
	<div class="rk1" onclick="deleteLevel999();">删除</div>
</div>
<div class="editPOP"></div>
</body>

<script>
$(document).bind('contextmenu',function(){
    return false;
});
$("body").click("mousedown",function(e){
    $(".rightKey").hide();
});




var canvasData = {x:0 , y:0, width:Math.ceil(window.innerWidth-325), height:Math.ceil(window.innerHeight-52)};
init_canvas(canvasData ,2,lineEvent1 , lineEvent2 ,lineEvent3,iconEvent4,changeIndex);//初始化
drawCircles();
	var　boardsData=null;
	var phyname=null;
	var machineBoxNo;
    var id = '[[${id}]]';
    var pId = "[[${pId}]]";
    $("#id").val(pId);
    var returnUrl = 'newCpus\?id\='+id+'\&pId\='+pId;
    $("#returnUrl").val(returnUrl);
    var url = '[[@{/machinebox/get_by_id}]]';
    $.ajax({
    	url:url,
    	async:false,
    	data:{id:id},
    	dataType:"JSON",
    	type:"POST"
    	}).done(function(data){
        if(data){
            var machineBoxes = data.data;
            phyname=machineBoxes.physicalTopology.name;
            $(".hostMachine").html(machineBoxes.machineBoxName);
            machineBoxNo = machineBoxes.machineBoxNo;
            var boards = machineBoxes.boards;
            boardsData=boards;
            if(boards&&boards.length>0){
                $.each(boards,function(k,v){
                    addCanvasLevel1(k,v.cpus.length,v);
                    var cpus = v.cpus;
                    if(cpus&&cpus.length>0){
                    	$.each(cpus,function(k1,v1){
                        		v1.boardId=v.id;
                        		addCanvasLevel2(k ,null,v1);
                        });
        	            drawCircles();
                    }
                });
            }
        }
    });
    //交换位置 
    function changeIndex(select1,select2){
    	if(select2!=null){
    		
    		$.ajax({
    			url:'[[@{/cpu/move}]]',
    			data:{cpuId:select1.cpu.id,boardId:select2.cpu.boardId},
    			dataType:"JSON",
    			type:"POST",
    		}).done(function(data){
    			if(data&&data.success){
    				$.ajax({
    					url:'[[@{/cpu/move}]]',
    					data:{cpuId:select2.cpu.id,boardId:select1.cpu.boardId},
    					dataType:"JSON",
    					type:"POST",
    				}).done(function(data2){
    					if(data2&&data2.success){
    						alert("交换成功");
    					}
    				});
    			}
    		});
    	}else{
			$.ajax({
				url:'[[@{/cpu/move}]]',
				data:{cpuId:select1.cpu.id,boardId:select1.cpu.boardId},
				dataType:"JSON",
				type:"POST",
			}).done(function(data3){
				if(data3&&data3.success){
					//alert("移动成功");
				}
			});
    	}
    }
</script>
<script type="text/javascript">
  //新增cpu
	function newCpus (chuan1,chuan2,chuan3) {	
	  	var curcpuType=chuan3;
	  	 if(curcpuType==1){
	  		$("#cpuType").val("1");
	        }else if(curcpuType==2){
		  		$("#cpuType").val("2");
	        }else if(curcpuType==3){
		  		$("#cpuType").val("3");
	        }else if(curcpuType==4){
		  		$("#cpuType").val("4");
	        }else if(curcpuType==5){
		  		$("#cpuType").val("5");
	        }else if(curcpuType==6){
		  		$("#cpuType").val("6");
	        }
    	
		$("#saveNewCpu").unbind('click');
		$("#saveNewCpu").bind('click', function(){
			var newIndex = 0;
			for(var i=0;i<canvasAllLevel2.length;i++){
				if(canvasAllLevel2[i].pIndex==chuan1){
					newIndex++;
				}
			}
			var cpu = {};
			var curCpuType= $("#cpuType").val();
			if(curCpuType=='0'){
				alert("请指定处理单元类型 ");
				return false;
			}
			
			var curType=$("#cpuType").val();
			cpu.cpuSerial = $("#cpuSerial").val();
			cpu.cpuId = $("#cpuId").val();
			cpu.cpuType = curCpuType;
			cpu.board={'id':canvasAllLevel1[chuan1].id};
			cpu = JSON.stringify(cpu);
			$.ajax({
				url:'[[@{/cpu/save}]]',
				data:cpu,
                contentType:"application/json",
				dataType:"JSON",
				type:"POST",
				async:false
			}).done(function(data){
				if(data&&data.success){
					$("#bottom2").hide();
					$(".editPOP").hide();
					data.data.boardId = data.data.board.id;
					var curLevel1=addCanvasLevel2(chuan1 , chuan2,data.data);
					var boardId = curLevel1.cpu.board.id;
					$("#cpuSerial").val('');
					 $("#cpuId").val('');
					 $("#cpuType").val('');
				    drawCircles();
		  			alert('保存成功 ');

				}
			}).fail(function(data){
				alert("保存失败");
				$("#bottom2").hide();
				$(".editPOP").hide();
				 $("#cpuSerial").val('');
				 $("#cpuId").val('');
				 $("#cpuType").val('');
			});
		});
	}
    //编辑cpu
    function saveCpus(){
    	var flag = true;
        var curObj;
        for(var i=0;i<canvasAllLevel2.length;i++){
            var color = canvasAllLevel2[i].color;
            if(color=="#009EE7"){
                curObj = canvasAllLevel2[i];
                flag = false;
                break;
			}
		}
		if(flag){
           alert("请选择处理单元卡");
           $("#cpuSerial2").val('');
  		   $("#cpuId2").val('');
  		   $("#cpuType2").val('');
           return false;
		}
		
		var cpu = {};
		var curCpuType2= $("#cpuType2").val();
		if(curCpuType2=='0'){
			alert("请指定处理单元类型 ");
			return false;
		}
		
		
		cpu.cpuSerial = $("#cpuSerial2").val();
		cpu.cpuId = $("#cpuId2").val();
		cpu.cpuType = curCpuType2;
		cpu.board={'id':canvasAllLevel1[curObj.pIndex].id};
		cpu.id=curObj.cpu.id;
		cpu = JSON.stringify(cpu);
		$.ajax({
			url:'[[@{/cpu/save}]]',
			data:cpu,
            contentType:"application/json",
			dataType:"JSON",
			type:"POST",
			async:false
		}).done(function(data){
			if(data&&data.success){
				alert("保存成功");
				curObj.cpu=data.data;
				var curType=data.data.cpuType;
				curObj.cpuType=curType;
				if(curType==1){
					curObj.img="./images/topology/SW.png"
				}else if(curType==2){
					curObj.img="./images/topology/FPGA.png"
				}else if(curType==3){
					curObj.img="./images/topology/MSU2.png"
				}else if(curType==4){
					curObj.img="./images/topology/DSP.png"
				}else if(curType==5){
					curObj.img="./images/topology/ppc.png"
				}else if(curType==6){
					curObj.img="./images/topology/ARM.png"
				}
		        drawCircles();
		        $("#bottom").hide();
		        $("#bottom1").hide();
			}
		}).fail(function(data){
			//alert(JSON.stringify(data));
			alert("修改失败");
	        $("#bottom1").hide();
		});
		
	
        $(".table-box").css({"bottom":"0px"});
        $("#cpuId2").val("");
        $("#cpuSerial2").val("");
        $("#cpuType2").val("");
		//$("#cpuRemark2").val("");
	}
    function dissave(){
    	cancelChoose();
		$(".editPOP").hide();
        $("#bottom1").hide();
        $("#bottom2").hide();
        $("#bottom3").hide();
        $("#bottom4").hide();
        $(".table-box").css({"bottom":"0px"});
        drawCircles();
    }
  //新增板卡
	function newBoard(chuan1 , chuan2){
	/* 	$("#bottom4").show();
		$(".editPOP").show(); */
		var machineBoxId=chuan1;
		$("#saveNewBoard").unbind('click');
		$("#saveNewBoard").bind('click', function(){
			var board={}; 
			var curBoardType=$("#boardType").val();
			if(curBoardType=='0'){
				alert("请指定板卡类型");
				return false;
			}
			
			board.boardId= $("#boardId").val();
			board.boardName=$("#boardName").val();
			board.boardType=curBoardType;
			//board.remark=$("#remark").val();
			board.machineBox = {"id":id};
			board.cpus = [];
			board=JSON.stringify(board);
			$.ajax({
				url:'[[@{/board/save}]]',
				data:board,
	            contentType:"application/json",
				dataType:"JSON",
				type:"POST",
				async:false
			}).done(function(data){
				if(data&&data.success){
					
					var curLevle2=addCanvasLevel1(chuan1 , chuan2 , data.data);
					alert("成功");
					$("#bottom4").hide();
					$(".editPOP").hide();
				}
			}).fail(function(data){
				alert(JSON.stringify(data));
				alert("失败");
				$("#bottom4").hide();
				$(".editPOP").hide();
			});
		});
		$("#boardId").val('');
		$("#boardName").val('');
		$("#boardType").val('');
	}
    //编辑板卡
    function saveBoards(){
        var flag = true;
        var curObj;
        for(var i=0;i<canvasAllLevel1.length;i++){
            var color = canvasAllLevel1[i].color;
            if(color=="#009EE7"){
                curObj = canvasAllLevel1[i];
                flag = false;
                break;
			}
		}
		if(flag){
            alert("请选择板卡");
            return false;
		}
		var board={}; 
		var curBoardType2=$("#boardType2").val();
		if(curBoardType2=='0'){
			alert("请指定板卡类型");
			return false;
		}
		
		board.boardId= $("#boardId2").val();
		board.boardName=$("#boardName2").val();
		board.boardType=curBoardType2;
		board.machineBox = {"id":id};
		board.id=curObj.board.id;
		board.cpus=[];
		for(var i=0;i<curObj.level2Objs.length;i++){
			board.cpus.push(curObj.level2Objs[i].cpu);
		}
		//board.cpus=curObj.level2Objs;
		//console.log(curObj.level2Objs);
		board=JSON.stringify(board);
		$.ajax({
			url:'[[@{/board/save}]]',
			data:board,
            contentType:"application/json",
			dataType:"JSON",
			type:"POST",
			async:false
		}).done(function(data){
			if(data&&data.success){
				alert("成功");
				curObj.board=data.data;
				curObj.title=data.data.boardName;
				drawCircles(); 
		        $("#bottom3").hide();
		        $(".table-box").css({"bottom":"0px"});
			}
		}).fail(function(data){
			alert("失败");
	        $("#bottom3").hide();
	        $(".table-box").css({"bottom":"0px"});
		});
    }
	//下一步
	function nextStep(){
        $("#id").val(pId);
		$("#form1").attr({method:"GET",action:'[[@{/physical_link_bindors}]]'}).submit();
	}
	//预览
	function showView(){
		var boarders=canvasAllLevel1;
        var cpus=canvasAllLevel2;
		for(var j=0;j<cpus.length;j++){
			if(cpus[j].cpu){
				
			}else{
				alert("处理单元信息未保存");
				return false;
			}
		}
		$("#name").val(phyname);
		$("#form1").attr({action:'[[@{physical_top_all_view}]]',method:"GET"}).submit();
        
	}
	function back(){
		$("#curId").val('[[${topId}]]');
		$("#form1").attr({method:"GET",action:'[[@{/new_machines_and_boardors}]]'}).submit();
    }
	function showBig(){
		window.location.href="physical_monitors2"
	}
</script>
</html>
